import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter) // VueRouter插件初始化

import Hie from '../work/Hie.vue'
import Hello from '../work/Hello.vue'
import Ennihao from '../work/Ennihao.vue'


const router = new VueRouter({
  // routes 路由规则们
  // route  一条路由规则 { path: 路径, component: 组件 }
  routes: [
    {
      path: '/hie',
      name: 'Hie',
      component: Hie
    },
    {
      path: '/',
      name: 'Hello',
      component: Hello
    },
    {
      path: '/nihao/:age',
      name: 'Ennihao',
      component: Ennihao
    }
  ]
})
export default router